home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 037a / exec33.zip / COMPAT.H < prev    next >
C/C++ Source or Header  |  1991-05-16  |  1KB  |  70 lines

  1. /*
  2.    COMPAT.H: EXEC function with memory swap - 
  3.              Borland/Microsoft compatibility header file.
  4.  
  5.    Public domain software by
  6.  
  7.         Thomas Wagner
  8.         Ferrari electronic GmbH
  9.         Beusselstrasse 27
  10.         D-1000 Berlin 21
  11.         Germany
  12. */
  13.  
  14. #include <stdlib.h>
  15. #include <stdio.h>
  16. #include <string.h>
  17. #include <ctype.h>
  18. #include <dos.h>
  19.  
  20. #if defined(__TURBOC__)
  21. #define TURBO  1
  22. #define MSC    0
  23. #else
  24. #define TURBO  0
  25. #define MSC    1
  26. #endif
  27.  
  28. #if (TURBO)
  29. #include <dir.h>
  30. #include <alloc.h>
  31. #include <sys\stat.h>
  32.  
  33. #define OS_MAJOR  (_version & 0xff)
  34.  
  35. #endif
  36.  
  37. #if (MSC)
  38. #include <malloc.h>
  39. #include <direct.h>
  40. #include <sys\types.h>
  41. #include <sys\stat.h>
  42.  
  43. #define fnsplit   _splitpath
  44. #define fnmerge   _makepath
  45.  
  46. #define MAXPATH   _MAX_PATH
  47. #define MAXDRIVE  _MAX_DRIVE
  48. #define MAXDIR    _MAX_DIR
  49. #define MAXFILE   _MAX_FNAME
  50. #define MAXEXT    _MAX_EXT
  51.  
  52. #define FA_RDONLY _A_RDONLY
  53. #define FA_HIDDEN _A_HIDDEN
  54. #define FA_SYSTEM _A_SYSTEM
  55. #define FA_ARCH   _A_ARCH
  56.  
  57. #define findfirst(a,b,c) _dos_findfirst(a,c,b)
  58. #define ffblk find_t
  59.  
  60. #define OS_MAJOR  _osmajor
  61.  
  62. #define farmalloc(x)    ((void far *)halloc(x,1))
  63. #define farfree(x)      hfree((void huge *)x)
  64.  
  65. #define stpcpy(d,s)     (strcpy (d, s), d + strlen (s))
  66.  
  67. #define MK_FP(seg,ofs)  ((void far *)(((unsigned long)(seg) << 16) | (unsigned short)(ofs)))
  68. #endif
  69.  
  70.